Learning Objectives

By the end of this 90-minute session, students will be able to:

  1. Solve linear equation systems using matrix notation and operations
  2. Understand composite and inverse functions, particularly exponential and logarithmic relationships
  3. Define and plot univariable functions in R for economic applications
  4. Create and visualize multivariable functions in R for business optimization
  5. Analyze quadratic functions and positive definite matrices with their graphical representations

Knowledge Point 1: Linear Equation Systems and Matrix Notation

Example 1.1: The Manufacturing Company

TechProd Manufacturing produces three products: smartphones (S), tablets (T), and laptops (L). The company needs to determine optimal production levels based on resource constraints.

Resource Requirements per Unit:

  • Labor hours: 2S + 3T + 4L = 1000 hours available

  • Materials (kg): 1S + 2T + 3L = 600 kg available

  • Machine time: 3S + 1T + 2L = 800 hours available

This real-world problem naturally required us to solve this system of 3 linear equations at same time. How do we want to proceed? Recall how we solve a simple linear: \[ax+b=0\] Procedure:

Step 1: Move the unknown to the right hand side and the known to the left hand side. \[ax = -b\] Step 2: Multiply the inverse of the coefficient \(a\) to both side of the equation.

\[a^{-1}ax = a^{-1}(-b)\] This leads the thesolution: \[x = -a^{-1}b\] For \(a=3\) and \(b=2\), R solution is as follows:

a = 3

b = 2

-solve(a)*b
##            [,1]
## [1,] -0.6666667

Can we follow the same procedure to solver a system of linear equations? The answer is yes. Here is how.

step 1: Move all unknowns to the left and side of the equation and the knowns to the right hand side of the equation and arrrange the unknown variables in the same order: i.e. \(S\) first, \(T\) second, and \(L\) third

\[2S + 3T + 4L = 1000\] \[1S + 2T + 3L = 600\] \[3S + 1T + 2L = 800\] step 1.1

Put all unkonwns into one sequence as a vector \(X=\left( \begin{array}{c} S\\ T\\ L\\ \end{array} \right)\)

and the knowns on the right hand side as a vector \(b=\left( \begin{array}{c} 1000\\ 600\\ 800\\ \end{array} \right)\)

step 1.2

Put the coefficients of the equation system into a matrix;

\(A=\left( \begin{array}{ccc} 2&3&4\\ 1&2&3\\ 3&1&2\\ \end{array} \right)\)

Note the for a 3 equations system, we have 3 unknowns, i.e. \(X\) has 3 elements: \(X=\left( \begin{array}{c} S\\ T\\ L\\ \end{array} \right)\); the right hand side knowns \(b\) also has 3 elements: \(b=\left( \begin{array}{c} 1000\\ 600\\ 800\\ \end{array} \right)\);

the coefficient matrix is a \(3 \times 3\) square matrix, the values in the matrix correspond to their positions in the two equations. ( This is why the order of the variables in the equation is sensitive.)

\[\underbrace{\left( \begin{array}{rrr} 2 & 3 & 4\\ 1 & 2 & 3\\ 3&1 & 2\\ \end{array} \right)}_{A} \underbrace{\left( \begin{array}{c} S\\ T\\ L\\ \end{array} \right)}_{X} = \underbrace{\left( \begin{array}{r} 1000\\ 600\\ 800\\ \end{array} \right)}_{b} \]

Step 2 Multiply the inverse of the coefficient \(A\) to both side of the equation

\[A^{-1}AX = A^{-1}b\] This leads to the solution \(A^{-1}A=I\):

\[X = A^{-1}b\]

A <- matrix(c(2,3,4,1,2,3,3,1,2),3,3,byrow = TRUE)
b <-c(1000,600,800)

solve(A)%*%b
##              [,1]
## [1,] 2.000000e+02
## [2,] 2.000000e+02
## [3,] 5.684342e-14

The solution is \(S=200\), \(T=200\), and \(L=0\).

Formal Presentation of Linear Equation Systems

Definition 1.1: Linear Equation System

A system of \(m\) linear equations in \(n\) unknowns has the form: \[\begin{cases} a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n = b_1 \\ a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n = b_2 \\ \vdots \\ a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n = b_m \end{cases}\]

Matrix Representation

This system can be written compactly as: \(\mathbf{Ax} = \mathbf{b}\)

Where: - \(\mathbf{A} = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix}\) - \(\mathbf{x} = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix}\) - \(\mathbf{b} = \begin{bmatrix} b_1 \\ b_2 \\ \vdots \\ b_m \end{bmatrix}\)

Matrix Operations

Matrix Addition: \((\mathbf{A} + \mathbf{B})_{ij} = a_{ij} + b_{ij}\)

Matrix Multiplication: \((\mathbf{AB})_{ij} = \sum_{k=1}^{p} a_{ik}b_{kj}\)

Properties: - Associative: \((\mathbf{AB})\mathbf{C} = \mathbf{A}(\mathbf{BC})\) - Distributive: \(\mathbf{A}(\mathbf{B} + \mathbf{C}) = \mathbf{AB} + \mathbf{AC}\) - Not commutative: \(\mathbf{AB} \neq \mathbf{BA}\) (in general)

Interactive Quiz 1.1


Inverse Matrix and Solving Linear Equation Systems

Formal Presentation

Definition 2.1: Matrix Inverse

For a square matrix \(\mathbf{A}\), the inverse matrix \(\mathbf{A}^{-1}\) satisfies: \[\mathbf{A}\mathbf{A}^{-1} = \mathbf{A}^{-1}\mathbf{A} = \mathbf{I}\]

where \(\mathbf{I}\) is the identity matrix.

Existence Conditions

\(\mathbf{A}^{-1}\) exists if and only if: 1. \(\mathbf{A}\) is square (\(n \times n\)) 2. \(\det(\mathbf{A}) \neq 0\) (A is non-singular)

Solution Method

If \(\mathbf{A}^{-1}\) exists, then the solution to \(\mathbf{Ax} = \mathbf{b}\) is: \[\mathbf{x} = \mathbf{A}^{-1}\mathbf{b}\]

Computing the Inverse

Using pencil and paper for 2×2 matrices: \[\mathbf{A}^{-1} = \frac{1}{\det(\mathbf{A})} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix}\] where \(\mathbf{A} = \begin{bmatrix} a & b \\ c & d \end{bmatrix}\) and \(\det(\mathbf{A}) = ad - bc\)

Using R

### assign the matrix
A = matrix(c(2,1,4,5),2,2)
### calculate the determinant
det(A)
## [1] 6
solve(A)
##            [,1]       [,2]
## [1,]  0.8333333 -0.6666667
## [2,] -0.1666667  0.3333333

For larger matrices: Use Gaussian elimination, LU decomposition, or computational methods.

Economic Interpretation

  • Determinant ≠ 0: The system has a unique solution (feasible allocation)
  • Determinant = 0: Either no solution (impossible constraints) or infinite solutions (redundant constraints)

Explanation: determinant=0 implies lines are parallel.

  • Parallel line with different intercepts, there will be no intersection \(\to\) no solution.

  • Parallel line with same intercepts, two lines overlaps each other \(\to\) infinite solution.

Interactive Quiz 2.1

Sample Codes in R


Knowledge Point 2: Composite Function and Inverse Function: Exponential and Logarithmic Functions

Example 2.1: The Startup Growth Story

TechStart Inc. is analyzing its growth patterns. The company’s user base grows exponentially: \(U(t) = 1000 \cdot e^{0.2t}\) where \(t\) is time in months.

The marketing team asks: “If we want to reach 5000 users, how many months will it take?”

This question requires finding the inverse of the exponential function, leading us to logarithmic functions.

Additionally, the company’s revenue depends on both user growth and pricing strategy: \(R(t) = P(U(t))\) where \(P(u) = 10u^{0.8}\) is the pricing function. This creates a composite function \(R(t) = P(U(t))\).

Formal Presentation

Definition 2.1: Composite Functions

Given functions \(f: A \to B\) and \(g: B \to C\), the composite function \((g \circ f): A \to C\) is defined by: \[(g \circ f)(x) = g(f(x))\]

Properties: - Associative: \((h \circ g) \circ f = h \circ (g \circ f)\) - Not commutative: \(g \circ f \neq f \circ g\) (in general)

Definition 2.2: Inverse Functions

A function \(f: A \to B\) has an inverse function \(f^{-1}: B \to A\) if: \[f^{-1}(f(x)) = x \text{ for all } x \in A\] \[f(f^{-1}(y)) = y \text{ for all } y \in B\]

Existence condition: \(f\) must be one-to-one (injective) and onto (surjective).

Exponential and Logarithmic Functions

Exponential Function: \(f(x) = a^x\) where \(a > 0, a \neq 1\)

  • Natural exponential: \(e^x\) where \(e \approx 2.71828\)

  • Properties: \(a^{x+y} = a^x \cdot a^y\), \(a^{xy} = (a^x)^y\)

Logarithmic Function: \(g(x) = \log_a(x)\) where \(a > 0, a \neq 1\)

  • Natural logarithm: \(\ln(x) = \log_e(x)\)

  • Inverse relationship: \(a^{\log_a(x)} = x\) and \(\log_a(a^x) = x\)

A function \(y = f(x)\) and its inverse function \(y = f^{-1}(x)\) are symmetric about the 45 degree line.

f <- function(x) exp(x)
f_inv <- function(x) log(x)

# Generate x values
x_vals <- seq(-2, 2, by = 0.1)
y_vals <- f(x_vals)
x_inv_vals <- seq(0.1, exp(2), by = 0.1)
y_inv_vals <- f_inv(x_inv_vals)

# Set up the plot
plot(x_vals, y_vals, type = "l", col = "blue", lwd = 2,
     xlim = c(-2, 5), ylim = c(-2, 8),
     xlab = "x", ylab = "y",
     main = "Function and Its Inverse: Symmetry About y = x")

# Plot the inverse
lines(x_inv_vals, y_inv_vals, col = "red", lwd = 2)

# Plot the 45-degree line y = x
abline(a = 0, b = 1, col = "gray", lty = 2, lwd = 2)

Business Applications

Exponential Growth Models:

  • Population growth: \(P(t) = P_0 e^{rt}\)

Why is the exponential good for describing growth process? Let say you invest $1000 ant it grows \(r=5\%\) per year. After \(t\) years

\[Amount = 1000\times(1+r)^t=1000\times(1+r)^t\] This is exponential growth because time \(t\) is in the exponent! Now imagine you don’t just grow once per year, but every second, or continuously. How is the annual growth linked to the continuous growth? This special case is taken into account by changing the base from \((1+r)\) to \(e=2.718\)

The general exponential growth formula becomes:

\[Amount = 1000\times e^{rt}= 1000\times e^{0.05t}\]

t <- seq(1,5,0.1)

A_a = 1000*1.05^t
A_e = 1000*exp(0.05*t)

plot(t,A_a,type = "l")
lines(t,A_e,col="red")

  • Compound interest: \(A(t) = P(1 + r)^t\),

  • Technology adoption: \(N(t) = L/(1 + e^{-k(t-t_0)})\) (logistic)

In early stages, a new technology (like smartphones, electric cars, or social media platforms) can spread quickly:

  • At first: few users, but growth accelerates.

  • But eventually: most people who want it already have it.

  • So growth slows, and adoption levels off.

The logistic function models S-shaped (sigmoid) growth:

\[Adoption(t) \frac{L}{1+e^{-k(t-t_0)}}\] Where:

  • \(L\) = maximum possible adoption (often called the carrying capacity)

  • \(k\) = how fast adoption spreads

  • \(t_0\) = the “midpoint” (when adoption hits 50%)

t <-seq(0,10,0.1)

Adoption <- 30/(1+exp(-1*(t-3)))

plot(t,Adoption,type="l")

Logarithmic Applications:

  • Time to reach target: \(t = \frac{\ln(N/N_0)}{r}\)

  • Elasticity of demand: \(\epsilon = \frac{d \ln Q}{d \ln P}\)

  • Information theory: \(H = -\sum p_i \ln(p_i)\)

Interactive Quiz 2.1

Procedural Presentation in R


Knowledge Point 3: Defining and Plotting Univariable Functions in R

Example 3.1: The Coffee Shop Economics

Bean & Brew Café wants to optimize its operations using mathematical modeling. The owner needs to understand:

  1. Production function: \(Q(L) = 10\sqrt{L}\) (cups per hour vs labor hours)
  2. Cost function: \(C(Q) = 50 + 2Q + 0.1Q^2\) (total cost vs output)
  3. Revenue function: \(R(Q) = 5Q - 0.05Q^2\) (revenue vs quantity sold)
  4. Profit function: \(\Pi(Q) = R(Q) - C(Q)\) (profit optimization)

The owner asks: “How can I use R to visualize these relationships and find the optimal production level?”

Formal Presentation

Definition 3.1: Function Definition in R

In R, functions can be defined using several approaches:

Method 1: Using function() keyword

f <- function(x) {
  return(expression_in_x)
}

Method 2: Vectorized operations

x <- seq(from, to, by = step)
y <- expression_in_x

Plotting Techniques

Basic plotting:

plot(x, y, type = "l", main = "Title", xlab = "X", ylab = "Y")

Advanced plotting with ggplot2:

ggplot(data, aes(x = x, y = y)) + 
  geom_line() + 
  labs(title = "Title", x = "X", y = "Y")

Economic Function Types

  1. Production Functions: \(Q = f(L, K)\) - output vs inputs
  2. Cost Functions: \(C = f(Q)\) - cost vs output
  3. Revenue Functions: \(R = f(Q)\) - revenue vs quantity
  4. Profit Functions: \(\Pi = R - C\) - profit optimization

Interactive Quiz 3.1


Knowledge Point 4: Defining and Plotting Multivariable Functions in R

Verbal Scenario 4.1: The Tech Company’s Strategic Planning

InnovateTech Corp is optimizing its operations across multiple dimensions:

  1. Utility Function: \(U(x,y) = x^{0.6}y^{0.4}\) (consumer satisfaction from products x and y)
  2. Profit Function: \(\Pi(p_1,p_2) = (p_1-10)q_1 + (p_2-15)q_2\) where \(q_i = 100-2p_i\) (profit from two products)
  3. Production Function: \(Q(L,K) = 20L^{0.7}K^{0.3}\) (output from labor L and capital K)

The CEO asks: “How can we visualize these multivariable relationships in R to make better strategic decisions?”

Formal Presentation

Definition 4.1: Multivariable Functions in R

In plotting a unitvariable function \(y = f(x)\), 1) we create a sequence of values for the input variabale \(x\) and 2) we calculate the values of the output variable \(y\) corresponding to each input variable value. 3) Then we plot these pairs of \((x,y)\) in the coordinate system and connect them with lines.

In plotting a multivaiable function \(z=f(x,y)\) we follow the same procedure. 1) we create a sequence of values for each input variable \(x\) and \(y\) respectively, 2) we calculate the value of hte output variabe \(z\) corresponding to each pair of input values. 3) Then we plot the triple \((x,y,z)\) in the 3D space of the coordinate system and connect them with lines (surfaces).

3D Surface Plot:

x <- seq(0, 10, length.out = 30)
y <- seq(0, 10, length.out = 30)

f <- function(x, y) { Q <- 20*x^0.7*y^0.3 }
z <- outer(x, y, f)

#op <- par(bg = "white")
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue")

Contour Plot

contour(x, y, z, nlevels = 20)

filled.contour(x, y, z)

Interactive surface

library(plotly)
plot_ly(x = x, y = y, z = z, type = "surface")

Slice

# --- Slice Plot ---
plot(x, f(x, y = 5), type = "l", col = "blue", lwd = 2,
     xlab = "Labour (L)", ylab = "Output", main = "Slice of Production Function (K = 5)")
lines(x, f(x, y = 2), col = "red", lwd = 2)
lines(x, f(x, y = 1), col = "green", lwd = 2)
legend("bottomright", legend = c("K = 5", "K = 2","K = 1"), col = c("blue", "red","green"), lwd = 2)

Visualization Techniques

  1. Surface plots: Show the 3D shape of the function
  2. Contour plots: Show level curves (isoquants, indifference curves)
  3. Heat maps: Color-coded representation of function values
  4. Cross-sections: 2D slices of the 3D function

Economic Interpretations

  • Isoquants: Curves of constant output in production functions
  • Indifference curves: Curves of constant utility
  • Iso-profit curves: Curves of constant profit
  • Gradients: Direction of steepest increase

Graphical Presentation

library(ggplot2)
library(plotly)
library(gridExtra)
library(viridis)

# Define ranges for analysis
x_range <- seq(1, 10, length.out = 50)
y_range <- seq(1, 10, length.out = 50)
p1_range <- seq(12, 30, length.out = 40)
p2_range <- seq(17, 35, length.out = 40)
L_range <- seq(1, 20, length.out = 40)
K_range <- seq(1, 20, length.out = 40)

# 1. Utility Function: U(x,y) = x^0.6 * y^0.4
utility_function <- function(x, y) { return(x^0.6 * y^0.4) }
U_grid <- outer(x_range, y_range, utility_function)

# Create data frame for ggplot
utility_df <- expand.grid(x = x_range, y = y_range)
utility_df$U <- as.vector(utility_function(utility_df$x, utility_df$y))

# Contour plot for utility
p1 <- ggplot(utility_df, aes(x = x, y = y, z = U)) +
  geom_contour_filled(bins = 15) +
  geom_contour(color = "white", alpha = 0.5) +
  labs(title = "Utility Function: U(x,y) = x^0.6 * y^0.4",
       subtitle = "Indifference curves (constant utility)",
       x = "Good X", y = "Good Y", fill = "Utility") +
  scale_fill_viridis_d() +
  theme_minimal()

# 2. 3D surface plot for utility (using base R for demonstration)
# Note: This will be shown in the R code section

# 3. Profit Function: Π(p1,p2) = (p1-10)(100-2p1) + (p2-15)(100-2p2)
profit_function <- function(p1, p2) {
  q1 <- 100 - 2*p1
  q2 <- 100 - 2*p2
  return((p1 - 10)*q1 + (p2 - 15)*q2)
}

profit_df <- expand.grid(p1 = p1_range, p2 = p2_range)
profit_df$Profit <- profit_function(profit_df$p1, profit_df$p2)

# Find maximum profit
max_profit_idx <- which.max(profit_df$Profit)
optimal_p1 <- profit_df$p1[max_profit_idx]
optimal_p2 <- profit_df$p2[max_profit_idx]
max_profit_value <- profit_df$Profit[max_profit_idx]

p2 <- ggplot(profit_df, aes(x = p1, y = p2, z = Profit)) +
  geom_contour_filled(bins = 20) +
  geom_contour(color = "white", alpha = 0.3) +
  geom_point(aes(x = optimal_p1, y = optimal_p2), 
             color = "red", size = 4, inherit.aes = FALSE) +
  labs(title = "Profit Function: Π(p₁,p₂)",
       subtitle = paste("Maximum at p₁ =", round(optimal_p1, 1), 
                       ", p₂ =", round(optimal_p2, 1)),
       x = "Price 1 (p₁)", y = "Price 2 (p₂)", fill = "Profit ($)") +
  scale_fill_viridis_d() +
  theme_minimal()

# 4. Production Function: Q(L,K) = 20L^0.7 * K^0.3
production_function <- function(L, K) { return(20 * L^0.7 * K^0.3) }

production_df <- expand.grid(L = L_range, K = K_range)
production_df$Q <- production_function(production_df$L, production_df$K)

p3 <- ggplot(production_df, aes(x = L, y = K, z = Q)) +
  geom_contour_filled(bins = 15) +
  geom_contour(color = "white", alpha = 0.5) +
  labs(title = "Production Function: Q(L,K) = 20L^0.7 * K^0.3",
       subtitle = "Isoquants (constant output levels)",
       x = "Labor (L)", y = "Capital (K)", fill = "Output") +
  scale_fill_viridis_d() +
  theme_minimal()

# 5. Cross-section analysis: Fix one variable
# Utility function with y = 5
x_cross <- seq(1, 10, by = 0.1)
U_cross_y5 <- utility_function(x_cross, 5)
U_cross_x5 <- utility_function(5, x_cross)

cross_section_df <- data.frame(
  Variable = rep(x_cross, 2),
  Utility = c(U_cross_y5, U_cross_x5),
  Type = rep(c("U(x,5)", "U(5,y)"), each = length(x_cross))
)

p4 <- ggplot(cross_section_df, aes(x = Variable, y = Utility, color = Type)) +
  geom_line(size = 1.2) +
  labs(title = "Cross-Sections of Utility Function",
       subtitle = "Holding one variable constant",
       x = "Variable Value", y = "Utility", color = "Cross-Section") +
  scale_color_manual(values = c("U(x,5)" = "blue", "U(5,y)" = "red")) +
  theme_minimal()

# 6. Gradient visualization (direction of steepest increase)
# Calculate partial derivatives numerically
dx <- 0.1
dy <- 0.1
x_grad <- seq(2, 8, by = 1)
y_grad <- seq(2, 8, by = 1)

gradient_df <- expand.grid(x = x_grad, y = y_grad)
gradient_df$dU_dx <- (utility_function(gradient_df$x + dx, gradient_df$y) - 
                      utility_function(gradient_df$x - dx, gradient_df$y)) / (2*dx)
gradient_df$dU_dy <- (utility_function(gradient_df$x, gradient_df$y + dy) - 
                      utility_function(gradient_df$x, gradient_df$y - dy)) / (2*dy)

# Normalize gradient vectors for visualization
gradient_df$magnitude <- sqrt(gradient_df$dU_dx^2 + gradient_df$dU_dy^2)
gradient_df$dU_dx_norm <- gradient_df$dU_dx / gradient_df$magnitude * 0.5
gradient_df$dU_dy_norm <- gradient_df$dU_dy / gradient_df$magnitude * 0.5

p5 <- ggplot(utility_df, aes(x = x, y = y, z = U)) +
  geom_contour(bins = 10, color = "lightblue") +
  geom_segment(data = gradient_df, 
               aes(x = x, y = y, 
                   xend = x + dU_dx_norm, yend = y + dU_dy_norm),
               arrow = arrow(length = unit(0.1, "cm")), 
               color = "red", inherit.aes = FALSE) +
  labs(title = "Gradient Field of Utility Function",
       subtitle = "Arrows show direction of steepest increase",
       x = "Good X", y = "Good Y") +
  theme_minimal()

# 7. Heat map representation
p6 <- ggplot(production_df, aes(x = L, y = K, fill = Q)) +
  geom_tile() +
  scale_fill_viridis_c() +
  labs(title = "Production Function Heat Map",
       subtitle = "Color intensity represents output level",
       x = "Labor (L)", y = "Capital (K)", fill = "Output") +
  theme_minimal()

# Arrange plots
grid.arrange(p1, p2, p3, p4, p5, p6, ncol = 3, nrow = 2)

# Print optimization results
cat("=== MULTIVARIABLE OPTIMIZATION RESULTS ===\n")
## === MULTIVARIABLE OPTIMIZATION RESULTS ===
cat("Optimal Prices: p₁ =", round(optimal_p1, 2), ", p₂ =", round(optimal_p2, 2), "\n")
## Optimal Prices: p₁ = 30 , p₂ = 32.69
cat("Maximum Profit: $", round(max_profit_value, 2), "\n")
## Maximum Profit: $ 1412.43
# Calculate optimal quantities
q1_optimal <- 100 - 2*optimal_p1
q2_optimal <- 100 - 2*optimal_p2
cat("Optimal Quantities: q₁ =", round(q1_optimal, 2), ", q₂ =", round(q2_optimal, 2), "\n")
## Optimal Quantities: q₁ = 40 , q₂ = 34.62

Interactive Quiz 4.1


Knowledge Point 5: Quadratic Functions and Positive Definite Matrices

In business and economics the following function is of particular interest \[f(x) = ax^2\]

Ask: When is this function always positive (except at $x=0)? (e.g. the business activity will grantee a positive result)

Answer: When \(a > 0\)

This is the one variable case of positive definiteness: a function that always curves upwards and has a minimum at 0.

Extending multivariate cases, now consider \[f(\bf{x}) = \bf{x}'A \bf{x}\] where \(\bf{x}\) is a vector and \(A\) is a square matrix. This is the multivariate version of the scalar quadratic. If this function is always positive except \(\bf{x=0\), then \(A\) is called positive definite.

Example 5.1: Hooke’s law and spring energy

In physics, the potential energy stored in a stretched spring is always positive (unless there’s no displacement):

\[ E = \frac{1}{2}\bf{x}'K\bf{x}\] where \(K\) is a stiffness matrix. For the system to make physical sense, energy must be positive \(\to\) \(K\) must be positive definite.

Example 5.2: The Investment Risk Analysis

Global Portfolio Management is analyzing investment risk using quadratic forms. The firm’s risk model for a two-asset portfolio is:

\[\text{Risk} = w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\sigma_{12}\]

Where: + \(w_1, w_2\) are portfolio weights

  • \(\sigma_1^2, \sigma_2^2\) are asset variances

  • \(\sigma_{12}\) is the covariance between assets

This can be written as a quadratic form: \(\text{Risk} = \mathbf{w}^T\mathbf{\Sigma}\mathbf{w}\) with \(\mathbf{w}=\left( \begin{array}{c} w_1\\ w_2\\ \end{array} \right)\) and \(\mathbf{\Sigma} =\left(\begin{array}{cc} \sigma_1^2& \sigma_{12}\\ \sigma_{12}& \sigma_2^2\\ \end{array} \right)\)

The risk manager asks: “How can we determine if our covariance matrix ensures the risk is always positive (positive definite), and how do we visualize this?”

Formal Presentation

Definition 6.1: Positive Definite Matrices

A symmetric matrix \(\mathbf{A}\) is positive definite if: \[\mathbf{x}^T\mathbf{A}\mathbf{x} > 0 \text{ for all } \mathbf{x} \neq \mathbf{0}\]

Equivalent conditions:

  1. All eigenvalues of \(\mathbf{A}\) are positive

  2. All leading principal minors are positive

  3. \(\mathbf{A} = \mathbf{L}\mathbf{L}^T\) for some invertible matrix \(\mathbf{L}\) (Cholesky decomposition)

Calculation of eigen value in R

A<- matrix(c(2,1,1,3),2,2,byrow=TRUE)
A
##      [,1] [,2]
## [1,]    2    1
## [2,]    1    3
eigen(A)
## eigen() decomposition
## $values
## [1] 3.618034 1.381966
## 
## $vectors
##           [,1]       [,2]
## [1,] 0.5257311 -0.8506508
## [2,] 0.8506508  0.5257311

Graphical Properties

  • Positive definite: Elliptical contours, unique minimum
  • Positive semi-definite: Elliptical or parabolic contours
  • Indefinite: Hyperbolic contours (saddle point)

One dimensional case

a = 10
x <- seq(-5,5,0.1)
y = a*x^2

plot(x,y,type="l")

Two dimensional case

# Create a grid over [-10, 10]
x <- seq(-10, 10, length.out = 100)
y <- seq(-10, 10, length.out = 100)

z <- outer(x, y, function(x, y) {
  mapply(function(x, y) {
    X <- c(x, y)
    t(X) %*% A %*% X
  }, x, y)
})

Surface

# --- Surface Plot ---
persp(x, y, z, theta = 30, phi = 30, expand = 0.5, col = "lightblue",
      main = "Surface Plot: z = xᵀAx", xlab = "x", ylab = "y", zlab = "z")

persp(x, y, z,
      theta = 30, phi = 30, expand = 0.5,
      col = "lightgoldenrod",   # Brighter color
      shade = 0.4,              # Add gentle shading for depth
      border = "white",         # Lighten gridlines
      ticktype = "detailed",
      main = "Bright Surface Plot: z = xᵀAx",
      xlab = "x", ylab = "y", zlab = "z")

Isoquants/ level lines

contour(x, y, z, nlevels = 25, col = "blue", main = "Isoquants of z = xᵀAx", xlab = "x", ylab = "y")

Heatmap

# --- Heatmap using ggplot2 ---
library(ggplot2)
library(reshape2)

df <- expand.grid(x = x, y = y)
df$z <- with(df, mapply(function(x, y) t(c(x, y)) %*% A %*% c(x, y), x, y))

ggplot(df, aes(x = x, y = y, fill = z)) +
  geom_tile() +
  scale_fill_viridis_c() +
  ggtitle("Heat Map of z = xᵀAx") +
  xlab("x") + ylab("y") +
  theme_minimal()

Slices

fixed_y <- 5
z_slice <- sapply(x, function(xi) {
  t(c(xi, fixed_y)) %*% A %*% c(xi, fixed_y)
})
plot(x, z_slice, type = "l", lwd = 2, col = "darkgreen",
     main = "Slice of z = xᵀAx (y = 5)", xlab = "x", ylab = "z")

fixed_y <- 6
z_slice6 <- sapply(x, function(xi) {
  t(c(xi, fixed_y)) %*% A %*% c(xi, fixed_y)
})


fixed_y <- 7
z_slice7 <- sapply(x, function(xi) {
  t(c(xi, fixed_y)) %*% A %*% c(xi, fixed_y)
})


plot(x, z_slice, type = "l", lwd = 2, col = "darkgreen",
     main = "Slice of z = xᵀAx (y = 5)", xlab = "x", ylab = "z")

lines(x, z_slice6, col = "red", lwd = 2)
lines(x, z_slice7, col = "green", lwd = 2)

Interactive surface

# --- Interactive 3D Surface ---
library(plotly)
plot_ly(x = x, y = y, z = z, type = "surface") |>
  layout(title = "Interactive Surface: z = xᵀAx",
         scene = list(
           xaxis = list(title = "x"),
           yaxis = list(title = "y"),
           zaxis = list(title = "z")))

Interactive Quiz 5.1

Procedural Presentation in R


Comprehensive Review Questions

Level 1: Descriptive Understanding (Basic Concepts)

Question 1.1

Define a linear equation system and explain how it can be represented in matrix form. Give an example from business.

Sample Answer: A linear equation system consists of multiple linear equations with the same variables. It can be written as \(\mathbf{Ax} = \mathbf{b}\) where \(\mathbf{A}\) is the coefficient matrix, \(\mathbf{x}\) is the variable vector, and \(\mathbf{b}\) is the constant vector.

Business example: A company producing phones (P) and tablets (T) with constraints: - Labor: \(2P + 3T = 100\) hours - Materials: \(P + 2T = 60\) kg

Matrix form: \(\begin{bmatrix} 2 & 3 \\ 1 & 2 \end{bmatrix} \begin{bmatrix} P \\ T \end{bmatrix} = \begin{bmatrix} 100 \\ 60 \end{bmatrix}\)

Grading: 3 points for definition, 2 points for matrix representation, 5 points for business example.

Question 1.2

What is the difference between a composite function and an inverse function? Provide mathematical examples.

Sample Answer: - Composite function: \((g \circ f)(x) = g(f(x))\) - applying one function to the result of another - Inverse function: \(f^{-1}(f(x)) = x\) - “undoes” the original function

Examples: - Composite: If \(f(x) = x^2\) and \(g(x) = x + 1\), then \((g \circ f)(x) = x^2 + 1\) - Inverse: If \(f(x) = 2x + 3\), then \(f^{-1}(x) = \frac{x-3}{2}\)

Grading: 4 points for definitions, 3 points for composite example, 3 points for inverse example.

Question 1.3

Explain what makes a matrix positive definite and why this property is important in economics.

Sample Answer: A symmetric matrix \(\mathbf{A}\) is positive definite if \(\mathbf{x}^T\mathbf{A}\mathbf{x} > 0\) for all \(\mathbf{x} \neq \mathbf{0}\). Equivalently, all eigenvalues are positive.

Economic importance: - Portfolio risk: Covariance matrices must be positive definite to ensure risk is always positive - Utility functions: Negative definite Hessian ensures concave utility (diminishing marginal utility) - Cost functions: Positive definite Hessian ensures convex costs (increasing marginal costs)

Grading: 4 points for definition, 6 points for economic applications.

Question 1.4

Describe three different ways to visualize a multivariable function in R.

Sample Answer: 1. 3D Surface Plot: persp() or plot_ly() shows the function as a 3D surface 2. Contour Plot: contour() shows level curves (constant function values) 3. Heat Map: geom_tile() uses color intensity to represent function values

Each method reveals different aspects: surfaces show overall shape, contours show optimization paths, heat maps highlight regions of interest.

Grading: 3 points per visualization method, 1 point for comparative insight.

Question 1.5

What is the economic interpretation of the determinant of a coefficient matrix in a linear system?

Sample Answer: The determinant indicates whether the system has a unique solution: - det(A) ≠ 0: Unique solution exists (constraints are independent) - det(A) = 0: Either no solution (inconsistent constraints) or infinite solutions (redundant constraints)

In business: If det(A) = 0, the production constraints are either impossible to satisfy simultaneously or some constraints are redundant and can be eliminated.

Grading: 5 points for mathematical interpretation, 5 points for business context.

Question 1.6

Explain the relationship between exponential and logarithmic functions in the context of business growth.

Sample Answer: Exponential and logarithmic functions are inverses: - Exponential: \(N(t) = N_0 e^{rt}\) models growth over time - Logarithmic: \(t = \frac{\ln(N/N_0)}{r}\) finds time to reach target

Business application: If users grow as \(U(t) = 1000e^{0.1t}\), to find when we reach 5000 users: \(t = \frac{\ln(5000/1000)}{0.1} = \frac{\ln(5)}{0.1} \approx 16.1\) months.

Grading: 4 points for mathematical relationship, 6 points for business application.

Level 2: Operational Understanding (Calculation and Practice)

Question 2.1

Solve the following system using matrix inversion: \[\begin{cases} 3x + 2y = 14 \\ x + 4y = 18 \end{cases}\]

Sample Answer: Matrix form: \(\begin{bmatrix} 3 & 2 \\ 1 & 4 \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} 14 \\ 18 \end{bmatrix}\)

Step 1: Calculate determinant: \(\det(A) = 3(4) - 2(1) = 12 - 2 = 10\)

Step 2: Find inverse: \(A^{-1} = \frac{1}{10} \begin{bmatrix} 4 & -2 \\ -1 & 3 \end{bmatrix} = \begin{bmatrix} 0.4 & -0.2 \\ -0.1 & 0.3 \end{bmatrix}\)

Step 3: Solve: \(\begin{bmatrix} x \\ y \end{bmatrix} = A^{-1}b = \begin{bmatrix} 0.4 & -0.2 \\ -0.1 & 0.3 \end{bmatrix} \begin{bmatrix} 14 \\ 18 \end{bmatrix} = \begin{bmatrix} 2 \\ 4 \end{bmatrix}\)

Solution: \(x = 2, y = 4\)

Grading: 3 points for setup, 2 points for determinant, 3 points for inverse, 2 points for solution.

Question 2.2

Find the composite function \((f \circ g)(x)\) and its derivative if \(f(x) = \ln(x)\) and \(g(x) = x^2 + 1\).

Sample Answer: Step 1: Composite function: \((f \circ g)(x) = f(g(x)) = \ln(x^2 + 1)\)

Step 2: Derivative using chain rule: \(\frac{d}{dx}[(f \circ g)(x)] = \frac{d}{dx}[\ln(x^2 + 1)] = \frac{1}{x^2 + 1} \cdot \frac{d}{dx}[x^2 + 1] = \frac{2x}{x^2 + 1}\)

Grading: 5 points for composite function, 5 points for derivative calculation.

Question 2.3

A company’s profit function is \(\Pi(q) = 100q - 2q^2 - 500\). Find the profit-maximizing quantity and maximum profit.

Sample Answer: Step 1: Find critical point by setting derivative to zero: \(\frac{d\Pi}{dq} = 100 - 4q = 0\) \(q^* = 25\)

Step 2: Verify it’s a maximum using second derivative: \(\frac{d^2\Pi}{dq^2} = -4 < 0\) ✓ (maximum)

Step 3: Calculate maximum profit: \(\Pi(25) = 100(25) - 2(25)^2 - 500 = 2500 - 1250 - 500 = 750\)

Answer: Optimal quantity = 25 units, Maximum profit = $750

Grading: 3 points for derivative, 2 points for critical point, 2 points for verification, 3 points for maximum profit.

Question 2.4

Calculate the eigenvalues of the matrix \(A = \begin{bmatrix} 5 & 2 \\ 2 & 2 \end{bmatrix}\) and determine if it’s positive definite.

Sample Answer: Step 1: Characteristic equation: \(\det(A - \lambda I) = 0\) \((5-\lambda)(2-\lambda) - 4 = 0\) \(\lambda^2 - 7\lambda + 6 = 0\) \((\lambda - 6)(\lambda - 1) = 0\)

Step 2: Eigenvalues: \(\lambda_1 = 6, \lambda_2 = 1\)

Step 3: Since both eigenvalues are positive, the matrix is positive definite.

Grading: 4 points for characteristic equation, 3 points for eigenvalues, 3 points for conclusion.

Question 2.5

Create an R function to plot the utility function \(U(x,y) = x^{0.3}y^{0.7}\) and find the utility level when \(x = 4, y = 9\).

Sample Answer:

# Define utility function
utility <- function(x, y) {
  return(x^0.3 * y^0.7)
}

# Calculate utility at specific point
U_value <- utility(4, 9)
print(paste("Utility at (4,9):", round(U_value, 3)))

# Create contour plot
x <- seq(1, 10, length.out = 50)
y <- seq(1, 10, length.out = 50)
z <- outer(x, y, utility)

contour(x, y, z, main = "Utility Function U(x,y) = x^0.3 * y^0.7")
points(4, 9, col = "red", pch = 19)

Utility at (4,9): \(U = 4^{0.3} \times 9^{0.7} = 1.516 \times 6.240 = 9.460\)

Grading: 4 points for function definition, 3 points for calculation, 3 points for plotting code.

Question 2.6

Solve for the inverse function of \(f(x) = 3e^{2x} + 1\) and verify your answer.

Sample Answer: Step 1: Set \(y = 3e^{2x} + 1\) and solve for \(x\): \(y - 1 = 3e^{2x}\) \(\frac{y-1}{3} = e^{2x}\) \(\ln\left(\frac{y-1}{3}\right) = 2x\) \(x = \frac{1}{2}\ln\left(\frac{y-1}{3}\right)\)

Step 2: Inverse function: \(f^{-1}(x) = \frac{1}{2}\ln\left(\frac{x-1}{3}\right)\)

Step 3: Verification: \(f(f^{-1}(x)) = 3e^{2 \cdot \frac{1}{2}\ln\left(\frac{x-1}{3}\right)} + 1 = 3e^{\ln\left(\frac{x-1}{3}\right)} + 1 = 3 \cdot \frac{x-1}{3} + 1 = x\)

Grading: 5 points for solving process, 3 points for inverse function, 2 points for verification.

Level 3: Causal Understanding (Reasoning and Explanation)

Question 3.1

Explain why the covariance matrix in portfolio theory must be positive definite and what happens if it’s not.

Sample Answer: Why positive definite is required: Portfolio variance is \(\sigma_p^2 = \mathbf{w}^T\mathbf{\Sigma}\mathbf{w}\) where \(\mathbf{w}\) is the weight vector and \(\mathbf{\Sigma}\) is the covariance matrix. Since variance represents risk and must be non-negative, we need \(\mathbf{w}^T\mathbf{\Sigma}\mathbf{w} \geq 0\) for all possible weight vectors \(\mathbf{w}\).

If not positive definite: - Negative eigenvalues: Some portfolios would have negative variance (impossible) - Zero eigenvalues: Perfect correlation exists, reducing the effective dimension - Mathematical issues: Optimization algorithms may fail or give meaningless results

Economic interpretation: Non-positive definite covariance matrices indicate either data errors, perfect correlations, or insufficient diversification opportunities.

Grading: 4 points for mathematical reasoning, 3 points for consequences, 3 points for economic interpretation.

Question 3.2

Why do exponential functions appear frequently in business growth models? Explain the underlying economic reasoning.

Sample Answer: Mathematical reason: Exponential growth occurs when the rate of change is proportional to the current level: \(\frac{dN}{dt} = rN\), leading to \(N(t) = N_0 e^{rt}\).

Economic reasoning: 1. Network effects: Each new user attracts more users (social media, platforms) 2. Compound growth: Reinvestment of profits leads to accelerating returns 3. Learning curves: Efficiency improvements compound over time 4. Market penetration: Early adopters influence others exponentially

Limitations: Real growth eventually faces constraints (market saturation, competition), leading to logistic rather than pure exponential growth.

Examples: Technology adoption, viral marketing, compound interest, population growth in new markets.

Grading: 3 points for mathematical foundation, 4 points for economic reasoning, 3 points for limitations/examples.

Question 3.3

Explain why matrix inversion fails when the determinant is zero and what this means economically.

Sample Answer: Mathematical explanation: Matrix inversion requires \(A^{-1} = \frac{1}{\det(A)} \text{adj}(A)\). When \(\det(A) = 0\), division by zero makes inversion impossible.

Geometric interpretation: Zero determinant means the matrix transforms space into a lower dimension (columns are linearly dependent).

Economic meaning: 1. Redundant constraints: Some equations provide no new information 2. Inconsistent system: Constraints contradict each other (no feasible solution) 3. Perfect correlation: Variables are perfectly related, reducing degrees of freedom

Business example: If labor and material constraints are proportional (redundant), the system has infinite solutions along a line rather than a unique optimal point.

Solution approaches: Remove redundant constraints, use pseudo-inverse, or reformulate the problem.

Grading: 3 points for mathematical explanation, 4 points for economic interpretation, 3 points for business example.

Question 3.4

Why is the chain rule essential for analyzing composite functions in business applications?

Sample Answer: Mathematical necessity: Composite functions like \(R(t) = P(Q(t))\) (revenue as function of time through quantity) require the chain rule: \(\frac{dR}{dt} = \frac{dP}{dQ} \cdot \frac{dQ}{dt}\).

Business reasoning: 1. Indirect relationships: Many business variables affect outcomes through intermediate variables 2. Marginal analysis: Understanding how changes propagate through the system 3. Sensitivity analysis: Determining which factors have the greatest impact

Examples: - Revenue optimization: Price affects demand, which affects revenue - Cost management: Input prices affect production costs, which affect total costs - Growth analysis: Marketing affects user acquisition, which affects revenue

Strategic importance: Helps identify leverage points where small changes create large impacts.

Grading: 3 points for mathematical foundation, 4 points for business reasoning, 3 points for examples.

Question 3.5

Explain why multivariable functions require different visualization techniques and how each technique reveals different insights.

Sample Answer: Dimensional challenge: Functions of multiple variables create surfaces in higher dimensions that cannot be directly visualized in 2D.

Visualization techniques and insights: 1. 3D surfaces: Show overall shape and curvature, reveal optimization landscape 2. Contour plots: Show level sets (isoquants, indifference curves), reveal trade-offs 3. Heat maps: Highlight regions of interest, show gradients and patterns 4. Cross-sections: Analyze behavior when some variables are fixed 5. Gradient fields: Show direction of steepest increase, optimization paths

Business applications: - Production planning: Isoquants show input substitution possibilities - Portfolio optimization: Contours show risk-return trade-offs - Market analysis: Heat maps reveal profitable market segments

Strategic value: Different visualizations support different decision-making needs.

Grading: 3 points for dimensional explanation, 4 points for technique comparison, 3 points for business applications.

Question 3.6

Why do quadratic functions play a central role in optimization theory and business decision-making?

Sample Answer: Mathematical properties: 1. Second-order approximation: Taylor expansion shows any smooth function is locally quadratic 2. Unique optimum: Positive/negative definite quadratics have unique global optima 3. Analytical solutions: Quadratic optimization has closed-form solutions

Economic relevance: 1. Diminishing returns: Quadratic production functions capture decreasing marginal productivity 2. Risk modeling: Portfolio variance is quadratic in weights 3. Cost structures: Many cost functions exhibit quadratic behavior (economies/diseconomies of scale)

Business applications: - Profit maximization: Revenue often quadratic (price elasticity), costs often quadratic - Inventory management: Holding costs quadratic in inventory levels - Quality control: Deviation costs typically quadratic

Computational advantage: Quadratic programming is well-developed with efficient algorithms.

Grading: 3 points for mathematical properties, 4 points for economic relevance, 3 points for business applications.

Level 4: Predictive Understanding (Application and Extension)

Question 4.1

A tech startup’s user base grows according to \(U(t) = 1000e^{0.15t}\) (users after t months). If the company needs 50,000 users to attract Series A funding, predict when they should start fundraising preparations (assuming 6 months lead time).

Sample Answer: Step 1: Find when they reach 50,000 users \(50,000 = 1000e^{0.15t}\) \(50 = e^{0.15t}\) \(\ln(50) = 0.15t\) \(t = \frac{\ln(50)}{0.15} = \frac{3.912}{0.15} = 26.08\) months

Step 2: Account for 6-month preparation time Start fundraising at: \(26.08 - 6 = 20.08\) months ≈ 20 months

Step 3: Verify user count at start of fundraising \(U(20) = 1000e^{0.15 \times 20} = 1000e^3 = 20,086\) users

Prediction: Start fundraising preparations at month 20 when they have ~20,000 users, to reach 50,000 users by month 26 when funding closes.

Risk factors: Growth rate may change, market conditions, competition.

Grading: 4 points for calculation, 3 points for timing strategy, 3 points for verification/risk assessment.

Question 4.2

A company’s profit function is \(\Pi(p_1, p_2) = (p_1-10)(100-2p_1) + (p_2-15)(80-p_2)\). Predict the impact on total profit if market research suggests demand for product 1 will increase by 20%.

Sample Answer: Step 1: Current optimal prices \(\frac{\partial \Pi}{\partial p_1} = 100 - 4p_1 + 20 = 120 - 4p_1 = 0 \Rightarrow p_1^* = 30\) \(\frac{\partial \Pi}{\partial p_2} = 80 - 2p_2 + 15 = 95 - 2p_2 = 0 \Rightarrow p_2^* = 47.5\)

Current profit: \(\Pi(30, 47.5) = (20)(40) + (32.5)(32.5) = 800 + 1056.25 = 1856.25\)

Step 2: New demand function (20% increase) New: \(q_1 = 120 - 2p_1\) (instead of \(100 - 2p_1\)) New profit: \(\Pi_{new}(p_1, p_2) = (p_1-10)(120-2p_1) + (p_2-15)(80-p_2)\)

Step 3: New optimal prices \(\frac{\partial \Pi_{new}}{\partial p_1} = 120 - 4p_1 + 20 = 140 - 4p_1 = 0 \Rightarrow p_1^{new} = 35\) \(p_2\) unchanged: \(p_2^{new} = 47.5\)

Step 4: New profit \(\Pi_{new}(35, 47.5) = (25)(50) + (32.5)(32.5) = 1250 + 1056.25 = 2306.25\)

Prediction: Profit increases by $2306.25 - 1856.25 = \(450\) (24.2% increase)

Strategic implications: Higher optimal price for product 1, significant profit leverage from demand increases.

Grading: 4 points for current optimization, 3 points for new optimization, 3 points for impact analysis.

Question 4.3

Given a covariance matrix \(\Sigma = \begin{bmatrix} 0.04 & 0.02 \\ 0.02 & 0.09 \end{bmatrix}\) for two assets, predict the minimum variance portfolio and its risk level.

Sample Answer: Step 1: Verify positive definiteness Eigenvalues: \(\lambda = \frac{0.13 \pm \sqrt{0.0169 - 0.0144}}{2} = \frac{0.13 \pm 0.05}{2}\) \(\lambda_1 = 0.09, \lambda_2 = 0.04\) (both positive ✓)

Step 2: Minimum variance portfolio weights For two assets: \(w_1 = \frac{\sigma_2^2 - \sigma_{12}}{\sigma_1^2 + \sigma_2^2 - 2\sigma_{12}} = \frac{0.09 - 0.02}{0.04 + 0.09 - 2(0.02)} = \frac{0.07}{0.09} = 0.778\) \(w_2 = 1 - w_1 = 0.222\)

Step 3: Minimum variance \(\sigma_{min}^2 = w_1^2\sigma_1^2 + w_2^2\sigma_2^2 + 2w_1w_2\sigma_{12}\) \(= (0.778)^2(0.04) + (0.222)^2(0.09) + 2(0.778)(0.222)(0.02)\) \(= 0.0242 + 0.0044 + 0.0069 = 0.0355\)

Prediction: - Optimal weights: 77.8% asset 1, 22.2% asset 2 - Minimum risk: \(\sqrt{0.0355} = 18.84\%\) standard deviation

Investment insight: Heavy weighting toward lower-variance asset, but diversification still reduces risk below either individual asset.

Grading: 3 points for verification, 4 points for calculation, 3 points for interpretation.

Question 4.4

A manufacturing company uses the production function \(Q(L,K) = 20L^{0.6}K^{0.4}\). If labor costs increase by 25%, predict the optimal adjustment in the labor-capital ratio and the impact on production costs.

Sample Answer: Step 1: Current optimal ratio (cost minimization) From \(\frac{MPL}{w} = \frac{MPK}{r}\): \(MPL = 12L^{-0.4}K^{0.4}\), \(MPK = 8L^{0.6}K^{-0.6}\) \(\frac{12L^{-0.4}K^{0.4}}{w} = \frac{8L^{0.6}K^{-0.6}}{r}\) \(\frac{K}{L} = \frac{2w}{3r}\)

Step 2: New ratio after 25% wage increase New wage: \(w_{new} = 1.25w\) \(\frac{K}{L}_{new} = \frac{2(1.25w)}{3r} = \frac{2.5w}{3r} = 1.25 \times \frac{2w}{3r}\)

Prediction: Capital-labor ratio increases by 25% (substitute capital for expensive labor)

Step 3: Cost impact For constant output \(Q_0\): \(L_{new} = L_0 \times (1.25)^{-0.4} = 0.871 \times L_0\) \(K_{new} = K_0 \times (1.25)^{0.6} = 1.147 \times K_0\)

New cost: \(C_{new} = 1.25w \times 0.871L_0 + r \times 1.147K_0 = 1.089wL_0 + 1.147rK_0\) If original cost was \(C_0 = wL_0 + rK_0\), cost increase depends on original labor share.

Strategic implications: Automate labor-intensive processes, invest in capital equipment.

Grading: 4 points for ratio calculation, 3 points for substitution analysis, 3 points for cost impact.

Question 4.5

Using the composite function \(R(t) = 50Q(t) - 0.1[Q(t)]^2\) where \(Q(t) = 100e^{0.05t}\), predict when revenue will start declining and the maximum revenue level.

Sample Answer: Step 1: Express revenue as function of time \(Q(t) = 100e^{0.05t}\) \(R(t) = 50(100e^{0.05t}) - 0.1(100e^{0.05t})^2 = 5000e^{0.05t} - 1000e^{0.1t}\)

Step 2: Find when revenue starts declining \(\frac{dR}{dt} = 5000(0.05)e^{0.05t} - 1000(0.1)e^{0.1t} = 250e^{0.05t} - 100e^{0.1t}\)

Set \(\frac{dR}{dt} = 0\): \(250e^{0.05t} = 100e^{0.1t}\) \(2.5 = e^{0.05t}\) \(t^* = \frac{\ln(2.5)}{0.05} = \frac{0.916}{0.05} = 18.32\) months

Step 3: Maximum revenue \(Q(18.32) = 100e^{0.05 \times 18.32} = 100 \times 2.5 = 250\) units \(R_{max} = 50(250) - 0.1(250)^2 = 12,500 - 6,250 = 6,250\)

Prediction: - Revenue peaks at month 18.3 - Maximum revenue: $6,250 - After month 18.3, revenue declines despite continued quantity growth (diminishing marginal revenue effect)

Business insight: Growth in quantity eventually hurts revenue due to price elasticity.

Grading: 4 points for derivative calculation, 3 points for optimization, 3 points for business interpretation.

Question 4.6

A portfolio manager has three assets with expected returns [8%, 12%, 15%] and wants to achieve 11% expected return. If the covariance matrix has eigenvalues [0.02, 0.05, 0.08], predict the portfolio’s risk characteristics.

Sample Answer: Step 1: Portfolio constraint \(w_1(0.08) + w_2(0.12) + w_3(0.15) = 0.11\) with \(w_1 + w_2 + w_3 = 1\)

This gives us: \(w_1(0.08) + w_2(0.12) + (1-w_1-w_2)(0.15) = 0.11\) \(0.08w_1 + 0.12w_2 + 0.15 - 0.15w_1 - 0.15w_2 = 0.11\) \(-0.07w_1 - 0.03w_2 = -0.04\) \(7w_1 + 3w_2 = 4\)

Step 2: Risk characteristics from eigenvalues All eigenvalues positive → covariance matrix is positive definite ✓ Risk range: \(\sqrt{0.02} = 14.1\%\) to \(\sqrt{0.08} = 28.3\%\)

Step 3: Efficient frontier position Target return (11%) is between lowest (8%) and highest (15%) returns. Expected risk level: approximately 16-22% (interpolated based on return level)

Prediction: - Portfolio is feasible (return target achievable) - Risk will be moderate (16-22% standard deviation) - Diversification benefits available (risk below highest individual asset) - Multiple weight combinations possible along constraint line

Strategic recommendation: Choose weights that minimize risk subject to return constraint.

Grading: 3 points for constraint setup, 4 points for risk analysis, 3 points for strategic insights.

Level 5: Empathic Understanding (Explaining to Others)

Question 5.1

You’re training a new analyst who asks: “Why do we use matrices for business problems when simple algebra seems easier?” Explain the advantages of matrix methods in a way that builds their intuition.

Sample Answer: Start with empathy: “Great question! I felt the same way when I started. Let me show you why matrices become your best friend in business analysis.”

Simple example: “Imagine you’re managing inventory for 3 products across 5 stores. That’s 15 variables! Writing 15 separate equations is messy and error-prone.”

Matrix advantage: 1. Organization: All information in one compact structure 2. Scalability: Same method works for 3 products or 300 products 3. Computer efficiency: Software can solve 1000×1000 systems instantly 4. Pattern recognition: Matrix properties reveal business insights

Concrete analogy: “Think of matrices like spreadsheets. You could do each calculation separately, but organizing data in rows and columns makes everything clearer and faster.”

Build confidence: “Once you see a few examples, you’ll wonder how you ever managed without matrices. They turn complex business problems into routine calculations.”

Next steps: “Let’s start with a simple 2×2 example and build up your comfort level.”

Grading: 3 points for empathy/connection, 4 points for clear explanation, 3 points for building confidence.

Question 5.2

A marketing manager is confused about composite functions: “Why can’t I just look at revenue directly instead of this complicated revenue-through-demand stuff?” Help them understand the business value.

Sample Answer: Acknowledge their perspective: “I understand the confusion! It does seem like extra complexity at first. But let me show you why this ‘complicated’ approach actually makes your job easier.”

Business reality: “In marketing, you don’t directly control revenue. You control things like advertising spend, which affects brand awareness, which affects demand, which affects revenue. That’s a composite function: Revenue(Demand(Advertising)).”

Why it matters: 1. Cause and effect: Shows how your actions create results 2. Optimization: Find the best advertising level, not just hope for good revenue 3. Prediction: “If I increase ad spend by $10k, what happens to revenue?” 4. Troubleshooting: When revenue drops, trace back through the chain

Practical example: “Say revenue drops 20%. Is it because: - Demand fell (market problem)? - Price changed (pricing problem)? - Conversion rate dropped (product problem)? Composite functions help you diagnose the real issue.”

Empowerment: “Once you master this, you’ll be the manager who can predict and control outcomes, not just react to them.”

Grading: 3 points for acknowledging confusion, 4 points for business relevance, 3 points for practical examples.

Question 5.3

An executive asks: “All these eigenvalues and positive definite stuff sounds like academic nonsense. What does it actually mean for my business?” Translate the concepts into executive language.

Sample Answer: Executive summary first: “Eigenvalues tell you if your business model is fundamentally sound or if there are hidden risks that could blow up.”

Real-world translation: - Positive definite = Stable business: All your risk factors point in the same direction. Diversification works. - Negative eigenvalues = Hidden danger: Some combinations of factors create impossible situations (like negative risk) - Zero eigenvalues = Redundancy: You’re measuring the same thing twice, wasting resources

Business examples: 1. Portfolio management: “Are your investments truly diversified, or are they all the same risk in disguise?” 2. Supply chain: “Are your suppliers independent, or would one disruption cascade through everything?” 3. Market research: “Are you asking different questions, or the same question five different ways?”

Bottom line: “Eigenvalues are like a business health check. They tell you if your strategy is mathematically sound before you bet the company on it.”

ROI argument: “Spending 30 minutes on eigenvalue analysis can save millions in failed strategies.”

Grading: 4 points for executive summary, 3 points for business translation, 3 points for ROI argument.

Question 5.4

A colleague struggles with multivariable functions: “I can barely handle one variable, and now you want me to think about three dimensions?” Guide them through building this skill progressively.

Sample Answer: Validate their concern: “You’re absolutely right to feel overwhelmed! Everyone struggles with this transition. Let’s build it step by step.”

Progressive approach: 1. Start familiar: “You already know multivariable thinking! When you buy a car, you consider price AND features AND reliability. That’s a 3D decision.”

  1. Visual building:
    • 1D: Line graph (price over time)
    • 2D: Scatter plot (price vs. features)
    • 3D: Add color for reliability
  2. Business intuition: “Profit depends on price AND quantity. You can’t optimize one without considering the other.”

Practical exercises: - Week 1: Fix one variable, plot the other (cross-sections) - Week 2: Contour plots (like topographic maps) - Week 3: Full 3D visualization

Confidence building: “Remember learning to drive? First you focused on steering, then added gas/brake, then traffic. Same principle here.”

Support system: “I’ll check in weekly, and we’ll tackle real business problems together. You’ll be surprised how quickly it clicks.”

Grading: 3 points for validation, 4 points for progressive approach, 3 points for ongoing support.

Question 5.5

A team member says: “I don’t understand why we need R when Excel can do calculations.” Help them see the value of programming for business analysis.

Sample Answer: Meet them where they are: “Excel is fantastic, and I use it daily! But let me show you when R becomes your superpower.”

Excel vs. R comparison: - Excel strength: Quick calculations, familiar interface, great for small datasets - R strength: Handles millions of rows, repeatable analysis, advanced statistics

When R shines: 1. Scale: “What takes 5 minutes in Excel takes 5 seconds in R with 100× more data” 2. Repeatability: “Write once, run monthly reports automatically” 3. Sophistication: “Advanced models that Excel simply can’t do” 4. Collaboration: “Share exact methods with colleagues worldwide”

Learning path: “Start by recreating your Excel analyses in R. Once you see the power, you’ll naturally want to learn more.”

Practical motivation: “Companies pay 20-30% more for analysts who can code. It’s an investment in your career.”

Reassurance: “You don’t need to become a programmer. Think of R as a very powerful calculator that remembers what you did.”

Grading: 3 points for respecting Excel, 4 points for clear comparison, 3 points for career motivation.

Question 5.6

A student asks: “Why do we need all this math theory when business is about people and relationships?” Help them connect mathematical rigor to business success.

Sample Answer: Honor their perspective: “You’re absolutely right that business is fundamentally about people! Math doesn’t replace human judgment—it amplifies it.”

Human-math connection: 1. Better decisions: “Math helps you understand patterns in human behavior that intuition might miss” 2. Fairness: “Objective analysis prevents bias in hiring, pricing, and resource allocation” 3. Communication: “Numbers provide a common language for diverse teams” 4. Credibility: “Stakeholders trust decisions backed by rigorous analysis”

Real examples: - Netflix: Math predicts what shows people will love - Uber: Algorithms match drivers with riders efficiently - Amazon: Recommendation engines understand customer preferences

The synthesis: “The best business leaders combine mathematical insight with human empathy. Math tells you what’s happening; wisdom tells you what to do about it.”

Career advantage: “In today’s data-driven world, leaders who can bridge math and people skills are incredibly valuable.”

Encouragement: “You’re not choosing between math and people—you’re learning to serve people better through mathematical understanding.”

Grading: 3 points for honoring perspective, 4 points for human-math connection, 3 points for career relevance.


Summary and Next Steps

This comprehensive Section 2 covers the essential mathematical foundations for business analysis:

  1. Linear systems and matrices - The backbone of resource allocation and constraint optimization
  2. Matrix inversion - Solving complex business systems efficiently
  3. Composite and inverse functions - Understanding indirect relationships and growth models
  4. R programming for univariable functions - Practical tools for economic analysis
  5. Multivariable function visualization - Advanced decision-making with multiple factors
  6. Quadratic forms and positive definite matrices - Risk analysis and optimization theory

Preparation for Section 3: These tools provide the foundation for understanding derivatives, which measure rates of change and enable optimization in business contexts.

Key Takeaways: - Mathematics provides powerful tools for business decision-making - Multiple representations (algebraic, graphical, computational) enhance understanding - R programming enables sophisticated analysis of real business problems - Interactive learning reinforces theoretical concepts with practical applications


Total estimated lecture time: 90 minutes Interactive elements: 6 quizzes + 6 R environments Assessment: 30 comprehensive questions across 5 levels of understanding